{% extends "documents/base.html" %}

{% block title %}
    {% if parent %}
        {{ parent.title }} - 
    {% endif %}
    {{ document.title }}
{% endblock %}

{% block side %}
    {% include "documents/side_navi.html" %}
{% endblock %}

{% block content %}
    <p class="p_person">
    <a href="{% url documents-index %}">&laquo; インデックス</a>
    {% if parent %}
        <a href="{% url documents-show label=parent.label %}">&laquo; {{ parent.title }}</a>
    {% endif %}
    </p>
        
    <div class="div_alpha14">
    <h2 class="h2_alpha02">{{ document.title }}</h2>
    <div class="div_alpha14_inner">
    
    {% if document.image %}
        <div class="document-image">
            <img src="{{ document.image.url }}" alt="{{ document.image_description }}" />
            <p>{{ document.image_description }}</p>
        </div>
    {% endif %}
    
    <p class="p02">
        {% if document.syntax %}
            {{ document.markuped_body|safe }}
        {% else %}
            {{ document.body|linebreaksbr }}
        {% endif %}
    </p>
    
    {% with children as documents %}
        {% include "documents/index_list.html" %}</li>
    {% endwith %}
    
    </div>
    </div>
{% endblock %}
